package staticfield;

public class Test {
    public static void main(String[] args)
    {
           //1 类名.静态变量
        Student.name = "袁华";
        System.out.println(Student.name);
        //2 对象名.实例变量
        Student s1 = new Student();
        Student s2 = new Student();
        s1.name = "王小二";
        s2.name = "王小三";
        System.out.println(s1.name);
        System.out.println(s2.name);
        s1.age = 18;
        s2.age = 22;
        System.out.println(s1.age);
        System.out.println(s2.age);
    }
}
